module.exports = function ($scope, $state, $resource, $stateParams, toaster) {

  /* 分页
      * ========================================= */
      $scope.maxSize = 5;            //最多显示多少个按钮
      $scope.bigCurrentPage = 1;      //当前页码
      $scope.itemsPerPage = 10;         //每页显示几条
      $scope.searchform = {};
    
      $scope.load = function () {
          var para = {
            tourgroup_name:$scope.searchform.tourgroup_name,
            guide_name : $scope.searchform.guide_name,
            pageNo: $scope.bigCurrentPage,
            pageSize: $scope.itemsPerPage,
          };
          para = angular.extend($scope.searchform, para);
          $resource('/api/as/ggc/tourgroupafter/findgroupdataList', {}, {}).save(para,function (res) {
    
            if (res.errcode !== 0) {
              alert("数据获取失败");
              return;
            }
      
            $scope.objs = res.data.results;
            $scope.bigTotalItems = res.data.totalRecord;
            $scope.bigCurrentPage = res.data.pageNo;
      
          });
      };
    $scope.load();
  }